Integrand size = 23, antiderivative size = 54 \[ \int \sqrt {a+b \sec ^2(e+f x)} \tan (e+f x) \, dx=-\frac {\sqrt {a} \text {arctanh}\left (\frac {\sqrt {a+b \sec ^2(e+f x)}}{\sqrt {a}}\right )}{f}+\frac {\sqrt {a+b \sec ^2(e+f x)}}{f} \]
[Out]
Time = 0.09 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {4224, 272, 52, 65, 214} \[ \int \sqrt {a+b \sec ^2(e+f x)} \tan (e+f x) \, dx=\frac {\sqrt {a+b \sec ^2(e+f x)}}{f}-\frac {\sqrt {a} \text {arctanh}\left (\frac {\sqrt {a+b \sec ^2(e+f x)}}{\sqrt {a}}\right )}{f} \]
[In]
[Out]
Rule 52
Rule 65
Rule 214
Rule 272
Rule 4224
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {\sqrt {a+b x^2}}{x} \, dx,x,\sec (e+f x)\right )}{f} \\ & = \frac {\text {Subst}\left (\int \frac {\sqrt {a+b x}}{x} \, dx,x,\sec ^2(e+f x)\right )}{2 f} \\ & = \frac {\sqrt {a+b \sec ^2(e+f x)}}{f}+\frac {a \text {Subst}\left (\int \frac {1}{x \sqrt {a+b x}} \, dx,x,\sec ^2(e+f x)\right )}{2 f} \\ & = \frac {\sqrt {a+b \sec ^2(e+f x)}}{f}+\frac {a \text {Subst}\left (\int \frac {1}{-\frac {a}{b}+\frac {x^2}{b}} \, dx,x,\sqrt {a+b \sec ^2(e+f x)}\right )}{b f} \\ & = -\frac {\sqrt {a} \text {arctanh}\left (\frac {\sqrt {a+b \sec ^2(e+f x)}}{\sqrt {a}}\right )}{f}+\frac {\sqrt {a+b \sec ^2(e+f x)}}{f} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(119\) vs. \(2(54)=108\).
Time = 0.56 (sec) , antiderivative size = 119, normalized size of antiderivative = 2.20 \[ \int \sqrt {a+b \sec ^2(e+f x)} \tan (e+f x) \, dx=\frac {\left (-2 \sqrt {a} \text {arcsinh}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {b}}\right ) \cos (e+f x)+\sqrt {2} \sqrt {b} \sqrt {\frac {a+2 b+a \cos (2 (e+f x))}{b}}\right ) \sqrt {a+b \sec ^2(e+f x)}}{\sqrt {2} \sqrt {b} f \sqrt {\frac {a+2 b+a \cos (2 (e+f x))}{b}}} \]
[In]
[Out]
Time = 0.16 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.07
method | result | size |
derivativedivides | \(\frac {\sqrt {a +b \sec \left (f x +e \right )^{2}}-\sqrt {a}\, \ln \left (\frac {2 a +2 \sqrt {a}\, \sqrt {a +b \sec \left (f x +e \right )^{2}}}{\sec \left (f x +e \right )}\right )}{f}\) | \(58\) |
default | \(\frac {\sqrt {a +b \sec \left (f x +e \right )^{2}}-\sqrt {a}\, \ln \left (\frac {2 a +2 \sqrt {a}\, \sqrt {a +b \sec \left (f x +e \right )^{2}}}{\sec \left (f x +e \right )}\right )}{f}\) | \(58\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 132 vs. \(2 (46) = 92\).
Time = 0.37 (sec) , antiderivative size = 312, normalized size of antiderivative = 5.78 \[ \int \sqrt {a+b \sec ^2(e+f x)} \tan (e+f x) \, dx=\left [\frac {\sqrt {a} \log \left (128 \, a^{4} \cos \left (f x + e\right )^{8} + 256 \, a^{3} b \cos \left (f x + e\right )^{6} + 160 \, a^{2} b^{2} \cos \left (f x + e\right )^{4} + 32 \, a b^{3} \cos \left (f x + e\right )^{2} + b^{4} - 8 \, {\left (16 \, a^{3} \cos \left (f x + e\right )^{8} + 24 \, a^{2} b \cos \left (f x + e\right )^{6} + 10 \, a b^{2} \cos \left (f x + e\right )^{4} + b^{3} \cos \left (f x + e\right )^{2}\right )} \sqrt {a} \sqrt {\frac {a \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}}\right ) + 8 \, \sqrt {\frac {a \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}}}{8 \, f}, \frac {\sqrt {-a} \arctan \left (\frac {{\left (8 \, a^{2} \cos \left (f x + e\right )^{4} + 8 \, a b \cos \left (f x + e\right )^{2} + b^{2}\right )} \sqrt {-a} \sqrt {\frac {a \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}}}{4 \, {\left (2 \, a^{3} \cos \left (f x + e\right )^{4} + 3 \, a^{2} b \cos \left (f x + e\right )^{2} + a b^{2}\right )}}\right ) + 4 \, \sqrt {\frac {a \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}}}{4 \, f}\right ] \]
[In]
[Out]
\[ \int \sqrt {a+b \sec ^2(e+f x)} \tan (e+f x) \, dx=\int \sqrt {a + b \sec ^{2}{\left (e + f x \right )}} \tan {\left (e + f x \right )}\, dx \]
[In]
[Out]
\[ \int \sqrt {a+b \sec ^2(e+f x)} \tan (e+f x) \, dx=\int { \sqrt {b \sec \left (f x + e\right )^{2} + a} \tan \left (f x + e\right ) \,d x } \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 377 vs. \(2 (46) = 92\).
Time = 0.46 (sec) , antiderivative size = 377, normalized size of antiderivative = 6.98 \[ \int \sqrt {a+b \sec ^2(e+f x)} \tan (e+f x) \, dx=\frac {2 \, {\left (\frac {a \arctan \left (-\frac {\sqrt {a + b} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - \sqrt {a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 2 \, a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 2 \, b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a + b} + \sqrt {a + b}}{2 \, \sqrt {-a}}\right )}{\sqrt {-a}} + \frac {2 \, {\left ({\left (\sqrt {a + b} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - \sqrt {a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 2 \, a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 2 \, b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a + b}\right )} b + \sqrt {a + b} b\right )}}{{\left (\sqrt {a + b} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - \sqrt {a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 2 \, a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 2 \, b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a + b}\right )}^{2} - 2 \, {\left (\sqrt {a + b} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - \sqrt {a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 2 \, a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 2 \, b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a + b}\right )} \sqrt {a + b} + a - 3 \, b}\right )} \mathrm {sgn}\left (\cos \left (f x + e\right )\right )}{f} \]
[In]
[Out]
Time = 20.34 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.85 \[ \int \sqrt {a+b \sec ^2(e+f x)} \tan (e+f x) \, dx=\frac {\sqrt {a+\frac {b}{{\cos \left (e+f\,x\right )}^2}}}{f}-\frac {\sqrt {a}\,\mathrm {atanh}\left (\frac {\sqrt {a+\frac {b}{{\cos \left (e+f\,x\right )}^2}}}{\sqrt {a}}\right )}{f} \]
[In]
[Out]